<%@ page language="java" contentType="text/html; charset=utf8"
    pageEncoding="utf8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.easytopit.demo.domain.Movie"%>
<!DOCTYPE html>
<html>
<head>
	<!-- Basic Page Needs -->
        <meta charset="utf-8">
        <title>选择电影</title>
        <meta name="description" content="A Template by Gozha.net">
        <meta name="keywords" content="HTML, CSS, JavaScript">
        <meta name="author" content="Gozha.net">
    
    <!-- Mobile Specific Metas-->
    	<meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta content="telephone=no" name="format-detection">
    
    <!-- Fonts -->
        <!-- Font awesome - icon font -->
        <link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
        <!-- Roboto -->
        <link href='http://fonts.useso.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
    
    <!-- Stylesheets -->
    <!-- jQuery UI --> 
        <link href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" rel="stylesheet">

        <!-- Mobile menu -->
        <link href="css/gozha-nav.css" rel="stylesheet" />
        <!-- Select -->
        <link href="css/external/jquery.selectbox.css" rel="stylesheet" />
        <!-- Swiper slider -->
        <link href="css/external/idangerous.swiper.css" rel="stylesheet" />
    
        <!-- Custom -->
        <link href="css/style.css?v=1" rel="stylesheet" />

        <!-- Modernizr --> 
        <script src="js/external/modernizr.custom.js"></script>
</head>

<body>
    <div class="wrapper">
        <!-- Header section -->
        <header class="header-wrapper">
            <div class="container">
                <!-- Logo link-->
                <a href='index.html' class="logo">
                    <img alt='logo' src="images/logo.png">
                </a>
                
                <!-- Main website navigation-->
                <nav id="navigation-box">
                    <!-- Toggle for mobile menu mode -->
                    <a href="#" id="navigation-toggle">
                        <span class="menu-icon">
                            <span class="icon-toggle" role="button" aria-label="Toggle Navigation">
                              <span class="lines"></span>
                            </span>
                        </span>
                    </a>
                </nav>
                
                <!-- Additional header buttons / Auth and direct link to booking-->
                <div class="control-panel">
                    <a href="/login" class="btn btn-md btn--warning btn--book">登录</a>
                    <a href="/reg" class="btn btn-md btn--warning btn--book">注册</a>
                </div>

            </div>
        </header>
        
        <!-- Search bar -->
        <div class="search-wrapper">
            <div class="container container--add">
                <form action="" id='search-form' method='get' class="search">
                    <input type="text" name="name" class="search__field" placeholder="搜索">
                    <select name="sorting_item" id="search-sort" class="search__sort" tabindex="0">
                        <option value='this.form.action="/queryMovieByName.do"' selected='selected'>搜索片名</option>
                        <option value='this.form.action="/queryMovieByType.do"'>搜索类型</option>
                        <option value='this.form.action="/queryMovieByCountry.do"'>搜索国家</option>
                        <option value='this.form.action="/queryMovieByDirector.do"'>搜索导演</option>
                        <option value='this.form.action="/queryMovieByActor.do"'>搜索演员</option>
                    </select>
                    <button type='submit' class="btn btn-md btn--danger search__button">搜索</button>
                </form>
            </div>
        </div>
        
        <!-- Main content -->

        <section class="container">
            <div class="order-container">
                <div class="order">
                    <img class="order__images" alt='' src="images/tickets.png">
                    <p class="order__title">选购影片<br><span class="order__descript">享受美好观影时光</span></p>
                </div>
            </div>
            <div class="order-step-area">
                <div class="order-step first--step">1.选择电影</div>
            </div>
			<h2 class="page-heading heading--outcontainer">选择影院</h2>
			<select>
	        	<c:forEach var="version" items="${cinemas}">
	            	<option value='${cinemas.name}'>${cinemas.name}</option>
	            </c:forEach>
	        </select>
        	<h2 class="page-heading heading--outcontainer">选择电影</h2>
        </section>
	        <form action="/selectMovie.do" method="post" name="form" enctype="multipart/form-data" accept-charset="utf-8">
		        <div class="choose-film">
		            <div class="swiper-container">
		              <div class="swiper-wrapper">
		                  <c:forEach var="movie" items="${movies}">
			                  <!--First Slide-->
			                  <div class="swiper-slide" data-film='${movie.name}'> 
			                     <div class="film-images">
			                         <img alt='' src="/upload/${movie.cover}" height="295px" width="185px">
			                     </div>
			                     <p class="choose-film__title">${movie.name}</p>
			                  </div>
		                  </c:forEach>
		              </div>
		            </div>
		        </div>
	        
	        	<section class="container">
	        	
	            <div class="col-sm-12">
	                <div class="choose-indector choose-indector--film">
	                    <strong>选择: </strong><input type="hidden" name="movie" id="choose_movie"><span class="choosen-area"></span>
	                </div>
	                
			        <h2 class="page-heading">选择版本</h2>
			        <select name="version">
			        	<c:forEach var="version" items="${versions}">
			            	<option value='${version.version}'>${version.version}</option>
			            </c:forEach>
			        </select>
	
	                <h2 class="page-heading">选择日期</h2>
	
	                <div class="choose-container choose-container--short">
	                    <div class="datepicker">
	                      <span class="datepicker__marker"><i class="fa fa-calendar"></i>日期</span>
	                      <input type="text" id="datepicker" value='选择日期' class="datepicker__input">
	                    </div>
	                </div>
	
	                <h2 class="page-heading">选择场次</h2>
	
	                <div class="time-select time-select--wide">
	                    <div class="time-select__group group--first">
	                        <div class="col-sm-3">
	                            <p class="time-select__place">上午</p>
	                        </div>
	                        
	                        <ul class="col-sm-6 items-wrap">
	                        	<li class="time-select__item" data-time='08:45'>08:45</li>
	                            <li class="time-select__item" data-time='09:40'>09:40</li>
	                        </ul>
	                    </div>
	
	                    <div class="time-select__group">
	                        <div class="col-sm-3">
	                            <p class="time-select__place">下午</p>
	                        </div>
	                        <ul class="col-sm-6 items-wrap">
	                        	<li class="time-select__item" data-time='14:30'>14:30</li>
	                        	<li class="time-select__item" data-time='15:00'>15:00</li>
	                            <li class="time-select__item" data-time='15:50'>15:50</li>
	                            <li class="time-select__item" data-time='16:40'>16:40</li>
	                            <li class="time-select__item" data-time='17:40'>17:40</li>
	                        </ul>
	                    </div>
	
	                    <div class="time-select__group">
	                        <div class="col-sm-3">
	                            <p class="time-select__place">晚上</p>
	                        </div>
	                        <ul class="col-sm-6 items-wrap">
	                            <li class="time-select__item" data-time='18:10'>18:10</li>
	                            <li class="time-select__item" data-time='19:00'>19:00</li>
	                            <li class="time-select__item" data-time='19:30'>19:30</li>
	                            <li class="time-select__item" data-time='20:00'>20:00</li>
	                            <li class="time-select__item" data-time='20:30'>20:30</li>
	                            <li class="time-select__item" data-time='21:20'>21:20</li>
	                            <li class="time-select__item" data-time='22:20'>22:20</li>
	                            <li class="time-select__item" data-time='22:50'>22:50</li>
	                            <li class="time-select__item" data-time='23:40'>23:40</li>
	                        </ul>
	                    </div>
	                </div>
	
	                <div class="choose-indector choose-indector--time">
	                    <strong>选择: </strong><input type="hidden" name="time" id="choose_time"><span class="choosen-area"></span>
	                </div>
	                <input type="submit" name="submit" style="display:none" />
	            </div>
	        </section>
        </form>

        <div class="clearfix"></div>

        <form id='film-and-time' class="booking-form" method='get' action='book2.html'>
            <input type='text' name='choosen-movie' class="choosen-movie">
            <input type='text' name='choosen-city' class="choosen-city">
            <input type='text' name='choosen-date' class="choosen-date">
            <input type='text' name='choosen-time' class="choosen-time">
        
            <div class="booking-pagination">
                <a href="#" class="booking-pagination__prev hide--arrow">
                    <span class="arrow__text arrow--prev"></span>
                    <span class="arrow__info"></span>
                </a>
                <a href="javascript:document.form.submit.click();" class="booking-pagination__next">
                    <span class="arrow__text arrow--next">下一步</span>
                    <span class="arrow__info">选择座位</span>
                </a>
            </div>

        </form>
        
        <div class="clearfix"></div>

        <footer class="footer-wrapper">
            <section class="container">
                <div class="col-xs-4 col-md-2 footer-nav">
                    <ul class="nav-link">
                        <li><a href="#" class="nav-link__item">Cities</a></li>
                        <li><a href="movie-list-left.html" class="nav-link__item">Movies</a></li>
                        <li><a href="trailer.html" class="nav-link__item">Trailers</a></li>
                        <li><a href="rates-left.html" class="nav-link__item">Rates</a></li>
                    </ul>
                </div>
                <div class="col-xs-4 col-md-2 footer-nav">
                    <ul class="nav-link">
                        <li><a href="coming-soon.html" class="nav-link__item">Coming soon</a></li>
                        <li><a href="cinema-list.html" class="nav-link__item">Cinemas</a></li>
                        <li><a href="offers.html" class="nav-link__item">Best offers</a></li>
                        <li><a href="news-left.html" class="nav-link__item">News</a></li>
                    </ul>
                </div>
                <div class="col-xs-4 col-md-2 footer-nav">
                    <ul class="nav-link">
                        <li><a href="#" class="nav-link__item">Terms of use</a></li>
                        <li><a href="gallery-four.html" class="nav-link__item">Gallery</a></li>
                        <li><a href="contact.html" class="nav-link__item">Contacts</a></li>
                        <li><a href="page-elements.html" class="nav-link__item">Shortcodes</a></li>
                    </ul>
                </div>
                <div class="col-xs-12 col-md-6">
                    <div class="footer-info">
                        <p class="heading-special--small">A.Movie<br><span class="title-edition">in the social media</span></p>

                        <div class="social">
                            <a href='#' class="social__variant fa fa-facebook"></a>
                            <a href='#' class="social__variant fa fa-twitter"></a>
                            <a href='#' class="social__variant fa fa-vk"></a>
                            <a href='#' class="social__variant fa fa-instagram"></a>
                            <a href='#' class="social__variant fa fa-tumblr"></a>
                            <a href='#' class="social__variant fa fa-pinterest"></a>
                        </div>
                        
                        <div class="clearfix"></div>
                        <p class="copy">&copy; A.Movie, 2013. All rights reserved. Done by Olia Gozha</p>
                    </div>
                </div>
            </section>
        </footer>
    </div>

	<!-- JavaScript-->
        <!-- jQuery 1.9.1--> 
        <script src="http://ajax.useso.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="js/external/jquery-1.10.1.min.js"><\/script>')</script>
        <!-- Migrate --> 
        <script src="js/external/jquery-migrate-1.2.1.min.js"></script>
        <!-- jQuery UI -->
        <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
        <!-- Bootstrap 3--> 
        <script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>

        <!-- Mobile menu -->
        <script src="js/jquery.mobile.menu.js"></script>
         <!-- Select -->
        <script src="js/external/jquery.selectbox-0.2.min.js"></script>
        <!-- Swiper slider -->
        <script src="js/external/idangerous.swiper.min.js"></script>

        <!-- Form element -->
        <script src="js/external/form-element.js"></script>
        <!-- Form validation -->
        <script src="js/form.js"></script>

        <!-- Custom -->
        <script src="js/custom.js"></script>
		
		<script type="text/javascript">
            $(document).ready(function() {
                init_BookingOne();
            });
		</script>
</body>
</html>